#!/usr/bin/env python
# -*- coding: utf-8 -*-


class BaseConfig(object):
    APP_NAME = "fx"
    TESTING = False
    SITE_URL = '/'
    PROPAGATE_EXCEPTIONS = True

    #: account
    SECRET_KEY = 'FX_SECRET_KEY_!@#$**'
    WTF_CSRF_SECRET_KEY = 'WTF_CSRF_SECRET_KEY_FX$#!@'
    PASSWORD_SECRET = 'FX_PASSWORD_SECRET_!)!%'
    SQLALCHEMY_TRACK_MODIFICATIONS = True

    RESERVED_WORDS = [
        'root', 'admin', 'bot', 'robot', 'master', 'webmaster',
        'account', 'people', 'user', 'users', 'project', 'projects',
        'search', 'action', 'favorite', 'like', 'love', 'none',
        'team', 'teams', 'group', 'groups', 'organization',
        'organizations', 'package', 'packages', 'org', 'com', 'net',
        'help', 'doc', 'docs', 'document', 'documentation', 'blog',
        'bbs', 'forum', 'forums', 'static', 'assets', 'repository',
        'public', 'private', 'mac', 'windows', 'ios', 'lab', u'管理员'
    ]

    LOGGERS = {
        'fx': {
            'level': 'INFO',
        },
    }

    BABEL_DEFAULT_LOCALE = 'zh_CN'


class CrmConfig(BaseConfig):
    SESSION_COOKIE_NAME = 'fx_session_id'
    PERMANENT_SESSION_LIFETIME = 3600 * 24 * 15
    SESSION_REFRESH_EACH_REQUEST = True
    PROJECT = 'crm'


class AdminConfig(BaseConfig):
    SESSION_COOKIE_NAME = 'fx_dashboard_session'
    DASHBOARD_USERNAME = 'admin'
    DASHBOARD_PASSWORD = '111111'
    PROJECT = 'admin'


class ApiConfig(BaseConfig):
    PROJECT = 'api'
